﻿using System.Collections.Generic;
using eCommerce.Core.Domain.Products;
using eCommerce.Models.Product;

namespace eCommerce.Services.Products
{
    public interface IProductService
    {

        void AdjustInventory(int itemId, bool decrease, int quantity);

        Product GetProduct(int productId);
        //void DeleteProduct(int productId);

        //Product GetProductById(int productId);

        //IList<Product> GetAllProducts();

        //IList<Product> GetAllProductsByShopPid(int shopId);

        //void InsertProduct(Product product);
        //void UpdateProduct(Product product);


        int InsertProduct(int shopId,
            string productName,
            string shortDescription,
            string fullDescription,
            decimal price,
            int stockQuantity,
            bool useProductAttribute,
            bool useItemAttribute,
            int productAttributeKeyId,
            int itemAttributeKeyId,
            int brandId,
            int categoryId,
            int pictureId,
            IList<string> productAttributeValues,
            IList<string> itemAttributeValues );

        int CreateProductAttributeKey(int productId, string keyName );


        //ProductInfoUpdateResult UpdateProductInfo(ProductInfoUpdateRequest productInfoUpdateRequest);



        //ProductVariant GetProductVariantById(int productVariantId);

        //ProductVariant GetProductVariantBySku(string sku);

        //int InsertProductVariantInfo(int productId, string name, string sku, decimal price, int displayOrder, int stockQuantity, int pictureId, bool published);
        //void UpdateProductVariantInfo(int productVariantId, string name, string sku, decimal price, int displayOrder, int stockQuantity, int pictureId, bool published);

        //IList<ProductVariant> GetProductVariantsByProductId(int productId);

        //void DeleteProductVariant(ProductVariant productVariant);
        //void AdjustInventory(ProductVariant productVariant, bool decrease,
        //   int quantity, string attributesXml);

        //IList<ProductAttribute> GetAllProductAttributes();
        //int InsertProductVariantAttribute(int pvId, AttributeControlType selectedAttributeType,int selectedProductAttributeId);

        //IList<SpecificationAttribute> GetAllSpecificationAttribute();
        //void InsertProductSpecificationAttribute(int productId, int specificationAttributeOptionId);


        //int InsertProductPicture(int productId, int pictureId, int displayOrder);

        //IList<ProductVariantAttribute> GetProductVariantAttributesByProductVariantId(int productVariantId);
        //ProductVariantAttribute GetProductVariantAttributeByProductVariantAttributeId(int productVariantAttributeId);
        //int InsertProductVariantAttributeValue(int productVariantAttributeId, string productVariantAttributeValue, int displayOrder);
        //ProductVariantAttributeValue GetProductVariantAttributeValueByProductVariantAttributeValueId(int productVariantAttributeValueId);
        //void DeleteProductVaraintAttribute(int productvariantattributeId);
        //void DeleteProductVaraint(int productVariantId);
        //void DeleteProductVaraintAttributeValue(int productvariantattributeValueId);
        //void DeleteProductPicture(int productPictureId);
        void InsertItems(int productId, IList<ItemGroup> itemGroups);


        int CreateProductAttributeValue(int itemId, string value, int productAttributeKeyId);

        IList<ProductAttributeKey> GetProductAttributeKeysByCatgory(int categoryId);
        IList<ItemAttributeKey> GetItemAttributeKeysByCategory(int categoryId);
        Item GetItemById(int itemId);
        
    }
}